<?php
$name = ($_GET['name']);
$con = new mysqli("localhost","root","flower","{$name}", "3306");
$a = $con->query("show tables from {$name}");
if($a){
	$two_arr = array();
	while($one_arr = $a->fetch_row()){
		$two_arr[] = $one_arr;
	}
	//print_r($two_arr);
}

?>
<html>
	<head>
		<style>
			body{
			background-color:#FCB6B8;
			color:white;}
			ol li a{
			display:block;
			text-decoration:none;
			color:#FFF;
			border-right:1px solid #B61626;
			padding:5px 5px 5px 15px;}
			ol li a:hover{
			background-color:#B01C20;}
			
		</style>
	</head>
	<body>
		<h1><?php echo $name?>数据库中的表为：</h1>
		<ol>
			<?php foreach($two_arr as $one_arr){?>
			<li><a href="onetable.php?dbname=<?php echo $name?>&&tbname=<?php echo $one_arr[0]?>"><?php echo $one_arr[0]?></a></li>
			<?php }?>
		</ol>
	</body>
</html>